<?php

//mTODO: add docblock
//print $_SERVER['QUERY_STRING']."<br />";
//print $_SERVER['REDIRECT_URL']."<br />";
$kvfuri2 = preg_replace("#\?.*$#", "", $_SERVER['REDIRECT_URL']);
//print $kvfuri2."<br />";
$kvfuri2 = str_replace("/default.php","",$kvfuri2);
//print $kvfuri2."<br />";
$kvfuri = preg_replace("#\?.*$#", "", $_SERVER['ORIG_SCRIPT_NAME']);
//print $_SERVER['ORIG_SCRIPT_NAME']."<br />";
//print $kvfuri."<br />";
$kvfuri = preg_replace("#$kvfuri2/#", "/", $kvfuri);
//print $kvfuri."<br />";
$kvfuri = ($kvfuri == "/" || $kvfuri == "") ? "/index" : $kvfuri;
define("KVFURI", $kvfuri);
require_once "../kvframework/config.php";

?>
